package com.edu.admin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.edu.admin.common.BaseMapper;
import com.edu.admin.entity.SysSubject;
import com.edu.admin.vo.SubjectVo;


/**
 * 年级表数据操作接口
 * 
 * @author Wangjiong
 * 
 */
@Mapper
public interface SubjectMapper extends BaseMapper<SysSubject> {

	/**
	 * 获取学科列表
	 * 
	 * @param phaseId
	 * @return List<SubjectVo>
	 */
	List<SubjectVo> getSubjectList(@Param("phaseId") Long phaseId);
	

	/**
	 * 根据学段及学科名获取学科id列表
	 * 
	 * @param phaseId
	 * @param subjectNames
	 * 
	 * @return List<Long>
	 */
	List<Long> getSubjectIdListBySubjectNameList(@Param("phaseId") Long phaseId,
												@Param("subjectNames")String subjectNames);
	
	/**
	 * 学科查重
	 * 
	 * @param phaseId
	 * @param subjectId
	 * @param subjectName
	 * 
	 * @return List<SubjectVo>
	 */
	List<SubjectVo> findSubjectBySubjectName(@Param("phaseId") Long phaseId,
											@Param("subjectId") Long subjectId,
											@Param("subjectName") String subjectName);
	
	/**
	 * 查询学科信息
	 * 
	 * @param subjectId
	 * 
	 * @return SubjectVo
	 */
	SubjectVo getSubjectBySubjectId(Long subjectId);


}
